package com.xjcs.saplingplan.room.utils

import com.xjcs.saplingplan.MainApp
import com.xjcs.saplingplan.room.AppDatabase
import com.xjcs.saplingplan.room.bean.focus.FocusBean

object FocusRoomUtils {

    private val focusDao by lazy {
        AppDatabase.getInstance(MainApp.getAppContext()).focusDao()
    }

    suspend fun insert(bean: FocusBean){
        focusDao.insert(bean)
    }

    suspend fun insertList(beanList: List<FocusBean>){
        focusDao.insertList(beanList)
    }

    suspend fun getAllFocus(userId: String){
        focusDao.getAllFocus(userId)
    }

}